package com.wrb.coupon.controller;

import com.wrb.coupon.response.ServerResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * @author wrb
 * @date 2019/11/25 11:40
 */
@RestController
@RequestMapping("/coupon")
@CrossOrigin(origins = "*", methods = {RequestMethod.POST, RequestMethod.GET})
@Api(tags = "会员优惠券")
public class CouponController {

	@RequestMapping(value = "/get", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
	@ApiOperation(value = "查看优惠券详情")
	public ResponseEntity get(
			@ApiParam(required = true, value = "优惠券id") @RequestParam(required = true) String couponId,
			@ApiParam(required = true, value = "用户id") @RequestHeader(required = true) String customerId
	) {
		return ServerResponse.success(couponId);
	}
}
